package com.ficus.road.maintain.service;

import com.ficus.road.maintain.core.model.zh.BridgeInfo;
import com.ficus.road.maintain.dao.BridgeInfoDao;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;

/**
 * @author xiawen yang
 * @date 2022/4/12 下午8:10
 */
@Service
public class BridgeInfoService {
    @Autowired
    private BridgeInfoDao bridgeInfoDao;

    public List<BridgeInfo> findAll() {
        return bridgeInfoDao.findAll().stream().filter(item -> ObjectUtils.isNotEmpty(item.getCompany())).collect(Collectors.toList());
    }
}
